package com.liaowei.system;

import cn.hutool.core.io.resource.ResourceUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class Main {
    public static void main(String[] args) {
        String jsonStr = ResourceUtil.readUtf8Str("static/tag.json");
        JSONObject tagJson = JSONUtil.parseObj(jsonStr);
        Set<String> keySet = tagJson.keySet();

        Map<String,List<String>> tagMap = new HashMap<>();
        for (String key : keySet) {
            if (!"data".equals(key) && !"list".equals(key)){
                tagMap.put(key,tagJson.get(key,List.class));
            }
        }

        Set<Map.Entry<String, List<String>>> entries = tagMap.entrySet();
        for (Map.Entry<String, List<String>> entry : entries) {
            System.out.println(entry.getKey() + "===" + entry.getValue());
        }
    }
}
